#!/usr/bin/expect -f
set username [lindex $argv 0]
set password [lindex $argv 1]
spawn sudo git pull
expect "Username for*"
send "$username\r"
expect "Password for*"
send "$password\r"
expect eof